Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce relative paths consistently #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jondavidjohn
Copy link

http://stackoverflow.com/a/24463362/555384

There are cases where @% will produce both relative and absolute
paths, this change will make the behavior consistent.

More specifically, even if you open the initial file relatively, some plugins
(like rails.vim) target the opening of related files (using :A from a
model for example) absolutely. In this case @% will go from producing
spec/model/thing_spec.rb to producing
/Users/jon/..../spec/model/thing_spec.rb, simply because you used a
feature of an unrelated plugin.

The specific case this is breaking for me, is that when running specs in
a VM, the relative path is key. Absolute paths referencing the host
machine obviously will blow up when attempting to run in a VM.

http://stackoverflow.com/a/24463362/555384

There are cases where `@%` will produce both relative and absolute
paths, this change will make the behavior consistent.

More specifically, even if you open the initial file relatively, some plugins
(like rails.vim) target the opening of related files (using :A from a
model for example) absolutely.  In this case `@%` will go from producing
`spec/model/thing_spec.rb` to producing
`/Users/jon/..../spec/model/thing_spec.rb`, simply because you used a
feature of an unrelated plugin.

The specific case this is breaking for me, is that when running specs in
a VM, the relative path is key.  Absolute paths referencing the host
machine obviously will blow up when attempting to run in a VM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant